package 面向对象;

import java.util.Scanner;

//遍历字符串
public class PrintArray {
    public static void main(String[] args) {
        //键盘录入
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String a = sc.next();
        //遍历
        for(int i = 0 ; i <a.length() ; i++){
           char b =a.charAt(i);
           System.out.println(b);
        }
    }
}
